import request from '@/utils/request'

// 查询码列表
export function listCodetable(query) {
  return request({
    url: '/system/codetable/list',
    method: 'get',
    params: query
  })
}

// 查询码详细
export function getCodetable(code) {
  return request({
    url: '/system/codetable/' + code,
    method: 'get'
  })
}

// 新增码
export function addCodetable(data) {
  return request({
    url: '/system/codetable',
    method: 'post',
    data: data
  })
}

// 修改码
export function updateCodetable(data) {
  return request({
    url: '/system/codetable',
    method: 'put',
    data: data
  })
}

// 删除码
export function delCodetable(code) {
  return request({
    url: '/system/codetable/' + code,
    method: 'delete'
  })
}

// 导出码
export function exportCodetable(query) {
  return request({
    url: '/system/codetable/export',
    method: 'get',
    params: query
  })
}